/*

Disco Ribbon 1.0
by Kert "Fro" Gartner
isotropy@ilos.net

This is my first attempt at making a config for WhiteCap. It came together
over a few hours of me just playing around with other people's code and
modifying bits and peices here and there.

Since there aren't enough configs with comments in them, I've decided to
comment this one as best I can with my understanding of how the different
sections work.

To be completely honest, I still don't understand exactly how most of the
math in this code works :) In case you're starting out and you're wondering
how I got started, I used Avalanche 1.0 as a code base and built on top of
that.

By the way, I crashed my machine a number of times while messing around
with this plugin. Remember, divide by zero is not good. :) Ah, good ol 40s
math is comming back to haunt me...

*/



Durn="2", /*This setting seems to control how long samples are 'kept' in
the grid. A higher number makes a more dense mesh (becuase of the more
samples in it) and causes a frame rate decrease. A lower number makes a
more sparse mesh. */

CamX="1",
CamY="-1* sin(0.4)",
CamZ="10+12*cos(7.2)",

/*
Above is camera stuff. Basically it defines where the camera is in 3D
space. I just played around with it untill something cool started happening
:)  */




CmLX="20",
CmLY="0",
CmLZ="0",

/* 
This is where the camera is pointed. It's commonly known as the
'interest' in many 3D programs. Now currently the camera interest isn't
moving, but some cool effects are possible here by moving it around. The
following code moves the interest all over the place. Uncomment it and
comment the above camera code to see what it does.

CmLX="20*(cos(t/0.5))",
CmLY="30*(cos(t/2))",
CmLZ="10*(cos(t*2))",
*/

/* Cool eh? Almost makes you motion sick, which is why I didn't activate it
by befault :) hehe. To understand how those formulas are working go fire up
Graphing Caculator (on a mac, it should be in your apple menu) and type in
that formula, but replace the t with an n. Animate it and watch the values
change. That changing value is the coordinate (x, y or z) in 3D space.  */




CUpX="0",
CUpY="0",
CUpZ="1",

/* This is the camera 'up' direction. Put in a -50 or +50 to make the
ribbion go up or down. This isn't actually changing the direction of the
ribbion, it's changing the orientation of the camera. Making x=0, y=-50 and
z=1 looks kinda cool.  */




C0="-1.2 + 1.8 * ( .5 * sin( t * 1.5 - 1.5 * dt ) + .5 )",
C1="cos( c0 )",
D0="15 * fft( s )",

//The above are temporary variables. I pulled them from other configs.




R="rnd(2)",
G="tan(s*t)",
B="sin(s)",

/* The RGB values are the color of the mesh. The rnd function is what gives
the mesh it's shimmering look. */

// Window size and position
widt=490,heig=360,

ConL=1,ConB=1,



X="15",
Y="165 * ( dt - .5 ) * c1 - abs(cos( sgn( s - .5 ) * c0 ) * d0)",
Z="165 * ( s - .5 ) * ( c0 ) + c1 * d0",

//Most of the above XYZ code was pulled from Artic Fox Memories.

Scal="900",

ScSz=1,
Pers="200",
Vers=40

